#!/bin/sh

alias curl='curl -stderr'

\rm -f tmppickerprourls
for i in `seq 1 1` #32 is the max but not 1 contains the latest
do
    curl "http://www.stockpickr.com/listAll.php?all=&Pro_next_page=$i" |egrep -o  "http://www.stockpickr.com/port/.+" |cut -d'"' -f1 >> tmppickerprourls
done

\rm -f tmppickerproport 
cat tmppickerprourls|sort |uniq |while read url
do
    curl $url |grep "clsHideOnPrint" |egrep -o "symbol/[A-Z]+"  |cut -d'/' -f2 >> tmppickerproport
done

cat tmppickerproport |sort |uniq -c |sort -n -r |head -n 50 |awk '{print $2}'> PickerProList
